package com.yanqu.road.server.cmd.zhaoshang;

import com.yanqu.road.pb.zhaoshang.ZhaoShangProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.zhaoshang.ZsModule;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_ZS_ROB_FROM_CROSS, desc = "")
public class ZsProjectSeatRobFromCrossCmd extends AbstractCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        ZhaoShangProto.ZsRobToServerMsg msg = ZhaoShangProto.ZsRobToServerMsg.parseFrom(packet.getBytes());
        long robUserId = msg.getRobUserId();
        if (robUserId > 0) {
            player.getModule(ZsModule.class).addRobTimes(robUserId);
        }
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
